# extends 'profile/profile_base.html'
# import 'macro/forms.html' as forms

# block profile_content
  <form method="POST" action="." novalidate>
    {{form.csrf_token}}
    {{forms.password_visible_field(form.new_password, autofocus=True)}}
    # if user_db.password_hash
      {{forms.password_visible_field(form.old_password)}}
      # if form.old_password.errors
        <div class="alert alert-info">
          <a class="alert-link" href="{{url_for('user_forgot')}}" target="_blank">Forgot password?</a>
        </div>
      # endif
    # endif
    <div class="controls">
      <button type="submit" class="btn btn-primary btn-block btn-loading" {{forms.data_loading_text()}}>
        # if user_db.password_hash
          Change Password
        # else
          Set Password
        # endif
      </button>
    </div>
  </form>
# endblock
